package cate.game.role.pvp.jungle.msg;

import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBJungle;

@ClientMsg(title = "丛林冒险-任务加速 请求")
public class JungleSpeedUpReq implements MsgInput {
    @Override
    public MsgConfig conf() {
        return MsgIdBJungle.SPEED_UP;
    }

    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = cc.getRole().getPvp().jungle.costSpeedUp();
        if (!r.ok()) {
            game.notice.message(cc.getRole(), r);
        }
    }
}
